<!--
  Generated template for the GetIdentifyingCodePage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar>
    <ion-title>发送邮箱验证码</ion-title>
  </ion-navbar>

</ion-header>


<ion-content padding>
  <form (ngSubmit)="toModifyPasswordPage()" #myForm="ngForm">
    <ion-row>
      <ion-col>
        <ion-item>
          <ion-input type="email" [disabled]="!login" #myMail="ngModel" name="mail" [(ngModel)]="mail" email placeholder="输入邮箱地址"></ion-input>
        </ion-item>
      </ion-col>
    </ion-row>

    <ion-row>
      <ion-col>
        <ion-item>
          <ion-input name="identifyingCode" [(ngModel)]="identifyingCode" required minlength="6" maxlength="6" placeholder="输入验证码"></ion-input>
        </ion-item>
      </ion-col>
      <ion-col>
        <button ion-button type="button" [disabled]="(seconds<60 && seconds>0) || myMail.errors!=null" (click)="getIdentifyingCode()">
          <span *ngIf="seconds<60 && seconds>0">获取验证码 ({{seconds}}s)</span>
          <span *ngIf="seconds==60 || seconds==0">获取验证码</span>
        </button>
      </ion-col>
    </ion-row>
    <button ion-button block type="submit" [disabled]="!myForm.valid || !mailSended">
      <span>下一步</span>
    </button>
  </form>
</ion-content>
